package cn.edu.jmu.oelp.service.impl;

import cn.edu.jmu.oelp.mapper.EntityMapper;
import cn.edu.jmu.oelp.pojo.Entity;
import cn.edu.jmu.oelp.service.EntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EntityServiceImpl implements EntityService {

    @Autowired
    private EntityMapper entityMapper;
    @Override
    public int addEntity(Entity entity) {
        return entityMapper.addEntity(entity);
    }

    @Override
    public boolean delEntity(int entityId) {
        return entityMapper.delEntity(entityId);
    }

    @Override
    public boolean updateEntity(Entity entity) {
        return entityMapper.updateEntity(entity);
    }

    @Override
    public Entity selEntityById(int entityId) {
        return entityMapper.selEntityById(entityId);
    }

    @Override
    public int lastParagraphsId(int id) {
        return entityMapper.lastParagraphsId(id);
    }
}
